package nc.gk.gkxm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import nc.gk.gkxm.model.dto.TopicDto;
import nc.gk.gkxm.model.entity.Option;
import nc.gk.gkxm.model.entity.Topic;
import nc.gk.gkxm.model.vo.PersonlibVo;
import nc.gk.gkxm.model.vo.TopicVO;

import java.util.List;
import java.util.Map;

public interface TopicMapper extends BaseMapper<Topic> {
    List<TopicVO> getAllBySortId(Integer[] sortIds);

    Map<String, String> getAnalyze(Integer topicId);

    void insertTopic(TopicDto topicDto);

    void insertOption(Option option);

    void updateTopic(TopicDto topicDto);

    void deletebOptionBytopicId(Integer topicid);

    void deleteByTopicId(Integer topicId);

    PersonlibVo getOneRandomTopic(String code);
}
